package com.sh.data.engine.domain.datadev.offline.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sh.data.engine.domain.datadev.offline.service.DatadevScriptService;
import com.sh.data.engine.repository.dao.datadev.DatadevScriptMapper;
import com.sh.data.engine.repository.dao.datadev.entity.DatadevScriptEntity;
import org.springframework.stereotype.Service;

@Service
public class DatadevScriptServiceImpl extends ServiceImpl<DatadevScriptMapper, DatadevScriptEntity>
    implements DatadevScriptService {

    @Override
    public DatadevScriptEntity getDatadevScriptByNodeId(Long nodeId) {
        DatadevScriptEntity one =
            getOne(
                new LambdaQueryWrapper<DatadevScriptEntity>()
                    .eq(DatadevScriptEntity::getNodeId, nodeId));
        return one;
    }
}
